package com.px.dal;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import com.px.idal.IReviewProjectRelMapper;
import com.px.model.ReviewProjectRel;
import com.px.mybatisunit.MyBatisUtil;

public class ReviewProjectRelMapper {
	// 创建SqlSession对象的实例
	SqlSession session = MyBatisUtil.getsqlSession(true);
	// IUserInfoMapper接口通过sqlsession的getmap方法,完成实现,全部自动化
	IReviewProjectRelMapper mapper = session.getMapper(IReviewProjectRelMapper.class);

	// 查询所有项目与评审组的id
	public List<ReviewProjectRel> getAllReviewProjectRel() {
		return mapper.getAllReviewProjectRel();
	}

	// 查指定id的项目id与评审组id
	public List<ReviewProjectRel> getReviewProjectByReviewProjectId(ReviewProjectRel review) {
		return mapper.getReviewProjectByReviewProjectId(review);
	}

	// 增加项目id与评审组id
	public int insertReviewProjectRel(ReviewProjectRel review) {
		return mapper.insertReviewProjectRel(review);

	}

	// 更新指定id的项目id与评审组id
	public int updateReviewProjectRelByReviewProjectRelId(ReviewProjectRel review) {
		return mapper.updateReviewProjectRelByReviewProjectRelId(review);

	}

	// 删除指定id的项目id与评审组id
	public int deleteReviewProjectRelByReviewProjectRelid(ReviewProjectRel review) {
		return mapper.deleteReviewProjectRelByReviewProjectRelid(review);

	}

	// 查询项目与评审组信息总条数
	public int getAllReviewProjectRelCounts() {
		return mapper.getAllReviewProjectRelCounts();
	};

	// 查询指定id项目与评审组关系是否存在
	public int checkReviewProjectRelIdIsExist(ReviewProjectRel review) {
		return mapper.checkReviewProjectRelIdIsExist(review);
	}

}
